unit add_invoice_elem;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  ExtCtrls;

type rowArray = array[0..9] of string;

type

  { TaddInvoiceElementFrom }

  TaddInvoiceElementFrom = class(TForm)
    addInvoiceElementButton: TButton;
    elementNameText: TLabeledEdit;
    elementQuantity: TLabeledEdit;
    elementUnit: TLabeledEdit;
    elementTotalPriceEdit: TLabeledEdit;
    procedure addInvoiceElementButtonClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    function inserted : boolean;
    function getData : rowArray;

  private
    { private declarations }
  public
    { public declarations }
    isFilled : boolean;
  end;

var
  addInvoiceElementFrom: TaddInvoiceElementFrom;

implementation

{$R *.lfm}

{ TaddInvoiceElementFrom }

function TaddInvoiceElementFrom.inserted : boolean;
begin
     inserted := self.isFilled;
end;

function TaddInvoiceElementFrom.getData : rowArray;
var
  resultArray : array[0..9] of string;
begin

     self.isFilled := false;
     getData := resultArray;


end;

procedure TaddInvoiceElementFrom.FormCreate(Sender: TObject);
begin
  self.isFilled := false;
end;

procedure TaddInvoiceElementFrom.addInvoiceElementButtonClick(Sender: TObject);
begin
  self.isFilled := true;
  self.close;
end;

end.

